﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics.CodeAnalysis;
using FoundationLib.Ifc.Exceptions;

namespace FoundationLib.Ifc.Data
{
	/// <summary>
	/// This interface is to be implemented by data access objects implementing
	/// delete access to the data source.
	/// </summary>
	/// <typeparam name="TObj">The domain object type</typeparam>
	[SuppressMessage("Microsoft.Naming", "CA1704")]
	public interface IDeletable<TObj> where TObj : class
	{
		/// <summary>
		/// Deletes the given object instance from the data source.
		/// </summary>
		/// <param name="instance">The domain object instance to be deleted</param>
		/// <exception cref="DataAccessException">An error occurred while deleting from the data source.</exception>
		void Delete(TObj instance);
	}
}
